<?php defined('SYSPATH') or die('No direct script access.');

class Controller_Blogger_Dashboard extends Controller_DefaultTemplate{

public function action_index()
{
	$blog = ORM::factory('blog');
	$blog_find = $blog->where('user_id', '=', Auth::instance()->get_user()->id)->find_all();
	$this->template->content->set('blog_app', $blog_find);
}

/**
* Initialize properties before running the controller methods (actions),
* so they are available to our action.
*/
public function before()
{
	// Run anything that need ot run before this.
	parent::before();

	if (!Auth::instance()->logged_in())
	{
		$this->request->redirect('/user/login');
	}

	$this->template->content = View::factory('blogger/dashboard');
}

}


